package com.old.people.dao;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;

import com.old.people.entities.Appraisal;
import com.old.people.entities.Disease;
import com.old.people.entities.Funds;
import com.old.people.entities.OldPeople;
import com.old.people.entities.OrderServiceServicer;
import com.old.people.entities.ServiceServicer;

@Mapper
public interface UserMapper {
	List<ServiceServicer> getService(Integer begin);//获取所有服务
	Integer getServiceSum();//获取服务数量
	List<ServiceServicer> selectService(String service_name);//查询服务名
	boolean insertOrder(String order_id,String order_createtime,String order_scheduledtime,String order_completetime,
			String order_status,String order_price,String servicer_id,String oldpeople_id,String account_id);//订单生成
	String getOldpeopleId(String account_id);//获取老人id
	boolean insertUserFunds(String funds_id,String funds_type,String funds_amount,String funds_date,String account_id);//资金记录
	String getAccount(String holder_id);//获取账号
	
	List<OrderServiceServicer> getOrderServiceServicer(String account_id,Integer begin);//获取服务记录
	Integer getOrderServiceServicerSum(String account_id);//获取服务记录总数
	boolean updateOrder(String order_id,String order_status);//取消服务 已评价 
	boolean updateOrders(String order_id,String order_completetime);//服务完成  status 已完成  
	boolean insertAppraisal(String appraisal_id,String appraisal_grade,String appraisal_content,String account_id,String order_id);//服务评价
	
	List<Disease> getdiseases(String account_id);//获取老人疾病参数
	
	List<Appraisal> getAppraisal(String account_id,Integer begin);//获取评价信息
	Integer getAppraisalSum(String account_id);//获取评价数量
	
	List<Funds> getFunds(String account_id,Integer begin);//获取资金记录信息
	
	OldPeople select(String account_id);//获取老人信息
	boolean updateOldpeople(String oldpeople_id,String oldpeople_name,String oldpeople_sex,String oldpeople_idcard,
			String oldpeople_address,String oldpeople_tel,String oldpeople_description,String oldpeople_familytel);//老人信息修改
}
